{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "import re\n",
    "from bs4 import BeautifulSoup as bs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['https://jspang.com/detailed?id=54', 'https://jspang.com/detailed?id=60', 'https://jspang.com/detailed?id=59', 'https://jspang.com/detailed?id=53', 'https://jspang.com/detailed?id=52', 'https://jspang.com/detailed?id=51', 'https://jspang.com/detailed?id=50', 'https://jspang.com/detailed?id=49', 'https://jspang.com/detailed?id=48', 'https://jspang.com/detailed?id=47', 'https://jspang.com/detailed?id=46', 'https://jspang.com/detailed?id=45', 'https://jspang.com/detailed?id=44', 'https://jspang.com/detailed?id=43', 'https://jspang.com/detailed?id=42', 'https://jspang.com/detailed?id=41', 'https://jspang.com/detailed?id=40', 'https://jspang.com/detailed?id=39', 'https://jspang.com/detailed?id=38', 'https://jspang.com/detailed?id=37', 'https://jspang.com/detailed?id=36', 'https://jspang.com/detailed?id=35', 'https://jspang.com/detailed?id=34', 'https://jspang.com/detailed?id=33', 'https://jspang.com/detailed?id=32', 'https://jspang.com/detailed?id=31', 'https://jspang.com/detailed?id=30', 'https://jspang.com/detailed?id=29', 'https://jspang.com/detailed?id=28', 'https://jspang.com/detailed?id=27', 'https://jspang.com/detailed?id=26', 'https://jspang.com/detailed?id=25', 'https://jspang.com/detailed?id=24', 'https://jspang.com/detailed?id=23', 'https://jspang.com/detailed?id=22', 'https://jspang.com/detailed?id=21', 'https://jspang.com/detailed?id=20', 'https://jspang.com/detailed?id=19']\n",
      "<class 'str'>\n"
     ]
    }
   ],
   "source": [
    "with open(\"index.html\",'r',encoding='utf-8') as f:\n",
    "    text=f.read()\n",
    "    f.close()\n",
    "    soup=bs(text,'html.parser')\n",
    "#     print(soup)\n",
    "    list1=soup.find_all(class_=\"list-title\")\n",
    "#     print(list)\n",
    "    href=[title.a['href'] for title in list1]\n",
    "    print(href)\n",
    "    names=[title.text for title in list1]\n",
    "    print(type(names[0]))\n",
    "#     print(names)\n",
    "    with open(\"index.html\",'w',encoding='utf-8') as f:\n",
    "        for y,z in zip(href,names):\n",
    "            text=text.replace(y,\"../\"+z+\".html\")\n",
    "        \n",
    "        f.write(text)\n",
    "        f.close()\n",
    "    \n",
    "#     for title, name in zip(list,names):\n",
    "#         re.sub('',names)\n",
    "#     print(text)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def gettext(url):\n",
    "    response=requests.get(url)\n",
    "# print(response.text)\n",
    "    response.encoding='utf-8'\n",
    "    return response.text\n",
    "def getlinks(url):\n",
    "    response=requests.get(url)\n",
    "# print(response.text)\n",
    "    response.encoding='utf-8'\n",
    "    soup=bs(response.text,'html.parser')\n",
    "    tr=soup.find_all(class_=\"list-title\")\n",
    "#     print(response.text)\n",
    "    print(tr)\n",
    "    return tr\n",
    "# links=getlinks(\"https://www.jspang.com/\")\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'bs4.element.Tag'>\n",
      "['50元加入小密圈 胖哥带你学一年', 'VSCode常用插件和技巧教程', 'Taro多端统一框架基础免费教程', 'Flutter实战视频-移动电商 （第69节更新）', 'React Hooks+Egg.js实战视频教程-技术胖Blog开发', 'React服务端渲染框架Next.js入门(共12集)', ' React Hooks 免费视频教程(共11集)', ' React Router 免费文字视频教程（共9集）', 'Redux免费视频教程（共24集）', '30元自制B站粉丝计数器', 'React16免费视频教程（共28集）', '20个Flutter实例视频教程  让你轻松上手工作', ' Flutter免费视频第四季-页面导航和其他', 'Flutter免费视频第三季-布局', 'Flutter免费视频第二季-常用组件', 'Flutter免费视频第一季-环境搭建', 'ES6免费视频教程 (共18集)', '一个前端必会的 Nginx免费教程 (共11集)', 'TypeScript免费视频教程 ，Deno前置知识 (共15集)', 'Nuxt.js免费视频教程 开启SSR渲染 ( 共10集)', '挑战全栈 MongoDB基础视频教程 (共21集)', 'CocosCreator 从基础到实战免费视频', '挑战全栈 Koa2免费视频教程 (共13集)', 'React项目构建和路由 免费视频教程 (共10集)', 'Webpack3.X版 成神之路 (共24集)', 'React免费视频教程-表单的应用 (共4集)', 'React免费视频教程-入门和组件 (共11集)', 'WEEX免费视频教程-从入门到放肆 (共17集)', 'Vue实战视频-快餐店收银系统 (共11集)', 'vuex免费视频教程', 'Vue-cli 免费视频教程', 'Vue-router免费视频教程', '【第四季】Vue2.0视频教程-实例和内置组件（共4集）', '【第三季】Vue2.0视频教程-选项（共6集）', '【第二季】Vue2.0视频教程-全局API(共9集)', '【第一季】Vue2.0视频教程-内部指令(共8集)', 'Fabric.js 免费视频教程（共13集）', '技术胖CSS3免费视频教程(共31集)']\n",
      "['https://www.jspang.com/detailed?id=54', 'https://www.jspang.com/detailed?id=60', 'https://www.jspang.com/detailed?id=59', 'https://www.jspang.com/detailed?id=53', 'https://www.jspang.com/detailed?id=52', 'https://www.jspang.com/detailed?id=51', 'https://www.jspang.com/detailed?id=50', 'https://www.jspang.com/detailed?id=49', 'https://www.jspang.com/detailed?id=48', 'https://www.jspang.com/detailed?id=47', 'https://www.jspang.com/detailed?id=46', 'https://www.jspang.com/detailed?id=45', 'https://www.jspang.com/detailed?id=44', 'https://www.jspang.com/detailed?id=43', 'https://www.jspang.com/detailed?id=42', 'https://www.jspang.com/detailed?id=41', 'https://www.jspang.com/detailed?id=40', 'https://www.jspang.com/detailed?id=39', 'https://www.jspang.com/detailed?id=38', 'https://www.jspang.com/detailed?id=37', 'https://www.jspang.com/detailed?id=36', 'https://www.jspang.com/detailed?id=35', 'https://www.jspang.com/detailed?id=34', 'https://www.jspang.com/detailed?id=33', 'https://www.jspang.com/detailed?id=32', 'https://www.jspang.com/detailed?id=31', 'https://www.jspang.com/detailed?id=30', 'https://www.jspang.com/detailed?id=29', 'https://www.jspang.com/detailed?id=28', 'https://www.jspang.com/detailed?id=27', 'https://www.jspang.com/detailed?id=26', 'https://www.jspang.com/detailed?id=25', 'https://www.jspang.com/detailed?id=24', 'https://www.jspang.com/detailed?id=23', 'https://www.jspang.com/detailed?id=22', 'https://www.jspang.com/detailed?id=21', 'https://www.jspang.com/detailed?id=20', 'https://www.jspang.com/detailed?id=19']\n"
     ]
    }
   ],
   "source": [
    "print(type(links[0]))\n",
    "names=[div.a.text for div in links]\n",
    "hrefs=[\"https://www.jspang.com\"+div.a['href'] for div in links]\n",
    "print(names)\n",
    "print(hrefs)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 获得网页js和css"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<_io.TextIOWrapper name='Taro多端统一框架基础免费教程.html' mode='r' encoding='utf-8'>\n",
      "['commons.765a0eeb.chunk', 'styles.ee63a1db.chunk', 'commons.765a0eeb.chunk', 'styles.ee63a1db.chunk']\n",
      "['https://jspang.com/_next/static/iJMRbIuvl5NSLUiclaAq9/pages/detailed.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/iJMRbIuvl5NSLUiclaAq9/pages/_app.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/runtime/webpack-4b444dab214c6491079c.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/chunks/commons.36ded9b3dd4bfe0b2ce1.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/chunks/styles.1d6723dbf925662a4716.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/runtime/main-6e6e334c1a3c61df2d4f.js\" as=\"script\"/><link rel=\"stylesheet\" href=\"https://jspang.com/_next/static/css/commons.765a0eeb.chunk.css', 'https://jspang.com/_next/static/css/styles.ee63a1db.chunk.css', 'https://jspang.com/_next/static/iJMRbIuvl5NSLUiclaAq9/pages/detailed.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/iJMRbIuvl5NSLUiclaAq9/pages/_app.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/runtime/webpack-4b444dab214c6491079c.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/chunks/commons.36ded9b3dd4bfe0b2ce1.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/chunks/styles.1d6723dbf925662a4716.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/runtime/main-6e6e334c1a3c61df2d4f.js\" as=\"script\"/><link rel=\"stylesheet\" href=\"https://jspang.com/_next/static/css/commons.765a0eeb.chunk.css', 'https://jspang.com/_next/static/css/styles.ee63a1db.chunk.css']\n",
      "commons.765a0eeb.chunk https://jspang.com/_next/static/iJMRbIuvl5NSLUiclaAq9/pages/detailed.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/iJMRbIuvl5NSLUiclaAq9/pages/_app.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/runtime/webpack-4b444dab214c6491079c.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/chunks/commons.36ded9b3dd4bfe0b2ce1.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/chunks/styles.1d6723dbf925662a4716.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/runtime/main-6e6e334c1a3c61df2d4f.js\" as=\"script\"/><link rel=\"stylesheet\" href=\"https://jspang.com/_next/static/css/commons.765a0eeb.chunk.css\n",
      "styles.ee63a1db.chunk https://jspang.com/_next/static/css/styles.ee63a1db.chunk.css\n",
      "commons.765a0eeb.chunk https://jspang.com/_next/static/iJMRbIuvl5NSLUiclaAq9/pages/detailed.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/iJMRbIuvl5NSLUiclaAq9/pages/_app.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/runtime/webpack-4b444dab214c6491079c.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/chunks/commons.36ded9b3dd4bfe0b2ce1.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/chunks/styles.1d6723dbf925662a4716.js\" as=\"script\"/><link rel=\"preload\" href=\"https://jspang.com/_next/static/runtime/main-6e6e334c1a3c61df2d4f.js\" as=\"script\"/><link rel=\"stylesheet\" href=\"https://jspang.com/_next/static/css/commons.765a0eeb.chunk.css\n",
      "styles.ee63a1db.chunk https://jspang.com/_next/static/css/styles.ee63a1db.chunk.css\n"
     ]
    }
   ],
   "source": [
    "# for index,link in zip(names,hrefs):\n",
    "#     with open(index+'.html','wr',encoding='utf-8') as f:\n",
    "#             print(f)\n",
    "import re\n",
    "with open(names[2]+'.html',mode='r',encoding='utf-8') as f:\n",
    "    print(f)\n",
    "    text=f.read()\n",
    "#                      获 得js\n",
    "\n",
    "#     text=text.replace('href=\\\"..','href=\\\"https://jspang.com')\n",
    "#     text=text.replace('href=\\\"/','href=\\\"https://jspang.com/')\n",
    "#     text=text.replace('href=\\\"#\"','href=\\\"'+hrefs[2]+'#')\n",
    "#     f.close()\n",
    "#     with open(names[2]+'.html',mode='w',encoding='utf-8') as f:\n",
    "#         print(text)\n",
    "#         f.write(text)\n",
    "#     matchObj = re.findall( r'href=\"https://jspang.com/_next/static/(.*?).js\"', text)\n",
    "#     jsnames=[link.split(\"/\")[-1] for link in matchObj]\n",
    "#     print(jsnames)\n",
    "#     links=[\"https://jspang.com/_next/static/\"+link+\".js\" for link in matchObj]\n",
    "#     print(links)\n",
    "#     for index,link in zip(jsnames,links):\n",
    "#         with open(index+'.js','w',encoding='utf-8') as f1:\n",
    "#             print(index,link)\n",
    "#             f1.write(gettext(link))\n",
    "\n",
    "#            获得css\n",
    "    matchObj = re.findall( r'href=\"https://jspang.com/_next/static/(.*?).css\"', text)\n",
    "    jsnames=[link.split(\"/\")[-1] for link in matchObj]\n",
    "    print(jsnames)\n",
    "    links=[\"https://jspang.com/_next/static/\"+link+\".css\" for link in matchObj]\n",
    "    print(links)\n",
    "    for index,link in zip(jsnames,links):\n",
    "        with open(index+'.css','w',encoding='utf-8') as f1:\n",
    "            print(index,link)\n",
    "            f1.write(gettext(link))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading pages (1/6)\n",
      "Warning: Failed to load http://7xjyw1.com1.z0.glb.clouddn.com/20170227091542.png (ignore)\n",
      "Warning: Failed to load http://7xjyw1.com1.z0.glb.clouddn.com/20170227001137.jpg (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                      \n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "end\n"
     ]
    }
   ],
   "source": [
    "import pdfkit\n",
    "import time\n",
    "for index,link in zip(names[-3:],hrefs[-3:]):\n",
    "    time.sleep(5)\n",
    "    pdfkit.from_url(link,index+\".pdf\")\n",
    "print(\"end\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "50元加入小密圈 胖哥带你学一年 https://www.jspang.com/detailed?id=54\n",
      "Taro多端统一框架基础免费教程 https://www.jspang.com/detailed?id=59\n",
      "Flutter实战视频-移动电商 （第69节更新） https://www.jspang.com/detailed?id=53\n",
      "React Hooks+Egg.js实战视频教程-技术胖Blog开发 https://www.jspang.com/detailed?id=52\n",
      "React服务端渲染框架Next.js入门(共12集) https://www.jspang.com/detailed?id=51\n",
      " React Hooks 免费视频教程(共11集) https://www.jspang.com/detailed?id=50\n",
      " React Router 免费文字视频教程（共9集） https://www.jspang.com/detailed?id=49\n",
      "Redux免费视频教程（共24集） https://www.jspang.com/detailed?id=48\n",
      "30元自制B站粉丝计数器 https://www.jspang.com/detailed?id=47\n",
      "React16免费视频教程（共28集） https://www.jspang.com/detailed?id=46\n",
      "20个Flutter实例视频教程  让你轻松上手工作 https://www.jspang.com/detailed?id=45\n",
      " Flutter免费视频第四季-页面导航和其他 https://www.jspang.com/detailed?id=44\n",
      "Flutter免费视频第三季-布局 https://www.jspang.com/detailed?id=43\n",
      "Flutter免费视频第二季-常用组件 https://www.jspang.com/detailed?id=42\n",
      "Flutter免费视频第一季-环境搭建 https://www.jspang.com/detailed?id=41\n",
      "ES6免费视频教程 (共18集) https://www.jspang.com/detailed?id=40\n",
      "一个前端必会的 Nginx免费教程 (共11集) https://www.jspang.com/detailed?id=39\n",
      "TypeScript免费视频教程 ，Deno前置知识 (共15集) https://www.jspang.com/detailed?id=38\n",
      "Nuxt.js免费视频教程 开启SSR渲染 ( 共10集) https://www.jspang.com/detailed?id=37\n",
      "挑战全栈 MongoDB基础视频教程 (共21集) https://www.jspang.com/detailed?id=36\n",
      "CocosCreator 从基础到实战免费视频 https://www.jspang.com/detailed?id=35\n",
      "挑战全栈 Koa2免费视频教程 (共13集) https://www.jspang.com/detailed?id=34\n",
      "React项目构建和路由 免费视频教程 (共10集) https://www.jspang.com/detailed?id=33\n",
      "Webpack3.X版 成神之路 (共24集) https://www.jspang.com/detailed?id=32\n",
      "React免费视频教程-表单的应用 (共4集) https://www.jspang.com/detailed?id=31\n",
      "React免费视频教程-入门和组件 (共11集) https://www.jspang.com/detailed?id=30\n",
      "WEEX免费视频教程-从入门到放肆 (共17集) https://www.jspang.com/detailed?id=29\n",
      "Vue实战视频-快餐店收银系统 (共11集) https://www.jspang.com/detailed?id=28\n",
      "vuex免费视频教程 https://www.jspang.com/detailed?id=27\n",
      "Vue-cli 免费视频教程 https://www.jspang.com/detailed?id=26\n",
      "Vue-router免费视频教程 https://www.jspang.com/detailed?id=25\n",
      "【第四季】Vue2.0视频教程-实例和内置组件（共4集） https://www.jspang.com/detailed?id=24\n",
      "【第三季】Vue2.0视频教程-选项（共6集） https://www.jspang.com/detailed?id=23\n",
      "【第二季】Vue2.0视频教程-全局API(共9集) https://www.jspang.com/detailed?id=22\n",
      "【第一季】Vue2.0视频教程-内部指令(共8集) https://www.jspang.com/detailed?id=21\n",
      "Fabric.js 免费视频教程（共13集） https://www.jspang.com/detailed?id=20\n",
      "技术胖CSS3免费视频教程(共31集) https://www.jspang.com/detailed?id=19\n"
     ]
    }
   ],
   "source": [
    "for index,link in zip(names,hrefs):\n",
    "    with open(index+'.html','w',encoding='utf-8') as f:\n",
    "        print(index,link)\n",
    "        f.write(gettext(link))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                      \n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                          \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/images/react-markdown.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/react-blog100.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                          \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/images/nextjs-01.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/images/useReducerGif.gif (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/useRef_demo01.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/react-hooks-demo01.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/images/React_Router_qiantao.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://www.jspang.com/images/reduxTools.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/redux001.jpg (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/redux_flow.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/rudex_flow_me.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/redux_flow_book.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/reduxDemo01.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/redux_action.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/images/react-redux001.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/images/b_count_1.jpg (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                      \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/images/React1901.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20190102/_g3UOTjGLvyYE-l0YMS6t-0E.jpg (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181217/7dTEF6Pshi4qew0-p-MWXNtX.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181217/5xuQKZ9PfP4YniYgWcNR53j4.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181213/pvA-e9vkrNiXVFUm6xXMO9zf.jpg (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181217/cHrgJ3SdAqFk1Ivta82vIP7g.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181213/BYN5e6kWp08BM9k6oQpEMilD.jpg (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181128/gRSTqpVIDNOaBRf0ZDuSiKnU.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181126/WGYiXw2hXJiyim-Z4kjx2zZE.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181126/99dCX6FRAZDtYT7633oKzyJC.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181126/J573sxUNOpGbCLoQ9ADT4n_g.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181128/fDdmrjpyYsvArS3lUo3VEJwK.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181129/vHFlm220MAq8J04dAPF6IdHi.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181129/sW_7ABysF4WkxoHR-CoXFpBw.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181130/dbCeeWolGf5ShrKyf-Z6D42W.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181113/21OZM1dxjtETrxEwO6iEUUed.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181112/9Tf0KKoQIWiDzC6EH4Emp_HV.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181113/ZjNVeAlDEZH8irILZ7VeM4Uz.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181112/DbYLe7GrxjRqgW8eG64sR2Ur.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181112/eKdtm57lqyEptuoZLMeO5UBj.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181113/0ayoXGtJoOS5fIa-DU24KbEa.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181122/S8RTcDfe1_IfHuu4CdrSrxGp.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181119/JviIMj_4KYt2C_vid5q5bWvd.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/MSD2uI502vy3DRZmlHX9onjG.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181030/YOmviA96d7pST8-ghsXKLD3B.jpg (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/lgd-jSBO2Upw9FnOFrYKbBfX.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/1KK9K0_EZqM6A7TAPXo7Arq0.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/mY5Qhlb66tRSXFWbmnZfUT2W.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181030/cETrXVG2NPDHD_3T0GMzsnmc.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181031/yLd3fYMgchoJpvFe2eK5wAC6.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181031/Exnsbuo_aOB3s75oTd4r6JCE.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181031/hWspWXNesCVAZYZV0Z2iSdhb.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181031/6-jjLcq_aEZHibMxVyy_3P78.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181031/e5SRe6KVwMubQqzl0j2WMtbt.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181031/rEMSYdoKxMYLmeAop7n720Hj.jpg (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/xQuLNq5ZikkOY6qxrV0F5KAK.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/dhVd15XCwZdXV9cS3FQOcUqa.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/gWf4s9RsHlsKK-SyMxmqeDU5.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/ZwbObMwjvhcsErM5boZjyvNH.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/qjSES3vkbBz935xuMb-gN06h.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/dbln0YAd-njaHfoNp42Ya70w.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181105/n_w6-BJ8Af8_a3ajhA_FP8JP.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181106/WUt5dxiRFulRy65z1exoJczt.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181106/tzPfiuSUHBYeUwt75b659yRf.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181106/VY-KBKi8Avdjj9JA4aOE4QgY.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181106/lhy-0jIpJ9I2gQxsH2Q-s9v0.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181106/08GJZG6lpm1ksUNV2_ke5iRo.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181107/Hbs0InrlsLlF0X9-xNF0B_US.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181107/2WxazaL369vpjmevd_xlTwkq.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load https://www.jspang.com/static/upload/20181007/ljnFrPYc23562AtUSLvSIYpQ.png (ignore)\n",
      "Warning: Failed to load https://www.jspang.com/static/upload/20181007/P6eXf6G5kJJ8L2mKDEZbHg1O.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181009/N3bF8FMGxljMydjEdTztVw7g.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181009/J_qLKrvR7WHBcmCbWauHKK78.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181005/vwknjv9sBYAayGpxkMKOXPB4.jpg (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181010/UnbGynSf4ZkthKJDfdxcobjf.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181024/wxDZWDrFC_o9Xf5e2j-mRc2g.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181024/5AwF_4MfkSxPtmre19xfPLgK.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181028/Kt1ecAV6mSyPKRL1JG9Tot_Q.png (ignore)\n",
      "Warning: Failed to load https://jspang.com/static/upload/20181028/bxWU2NIWFrC4gRJp3fW_M_Yu.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180824/j1ZWi5on7n8hoDodtVFt.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                      \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180824/H4pSr2_Im0EovaTsy1T8.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                      \n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/O_R6vBmU4I5gRI59LwCW.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/RS84cpzYC7rrwNc7WzGX.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/5cRVIfGFyUkt0MNtSqPw.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/MUI_BK29pTjwXN6aRKgK.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/JFMzxWJcJm5oIRIejv99.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/tQY830SfwQUnzkbJ2_l3.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading pages (1/6)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/VADjfl2ZU7vkaeYU7CLy.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/waPZKoMSq3mbw_SzDzyW.jpg (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/OmNyeqQNgXBocpZAKQIK.jpg (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/dqowx0EpSVI0jnApfyfA.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/SZaYY7F2uBUSIZFkTmwA.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/n5JjrVPi3_ZAs8J_Qpd3.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/BR5mygUtj2xyCPvsMnjn.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/AF5M_TIZHU5cdIK55Dgg.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/szF_R7876mBFvpvedzyi.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/rwLnj37bD5PL_GLfNn2q.png (ignore)\n",
      "Warning: Failed to load http://59.110.165.66/static/upload/20180823/P2OIISvEn71MI_7szwD4.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n",
      "Loading pages (1/6)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                      \n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.\n",
      "Loading pages (1/6)\n",
      "Warning: Failed to load http://7xjyw1.com1.z0.glb.clouddn.com/web20170326113703.png (ignore)\n",
      "Counting pages (2/6)                                               \n",
      "Resolving links (4/6)                                                       \n",
      "Loading headers and footers (5/6)                                           \n",
      "Printing pages (6/6)\n",
      "Done                                                                        \n"
     ]
    },
    {
     "ename": "OSError",
     "evalue": "wkhtmltopdf reported an error:\nLoading pages (1/6)\r\n[>                                                           ] 0%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[=============>                                              ] 23%\r[=============>                                              ] 23%\rWarning: Failed to load http://7xjyw1.com1.z0.glb.clouddn.com/vue-lifecycle.png (ignore)\r\n[==============>                                             ] 24%\r[=====================>                                      ] 35%\r[======================>                                     ] 37%\r[========================>                                   ] 41%\r[=========================>                                  ] 43%\r[===========================>                                ] 46%\r[=============================>                              ] 49%\r[==============================>                             ] 51%\r[===============================>                            ] 53%\r[=====================================>                      ] 62%\r[========================================>                   ] 68%\r[==========================================>                 ] 71%\r[===========================================>                ] 73%\r[=============================================>              ] 76%\r[================================================>           ] 80%\r[=================================================>          ] 82%\r[==================================================>         ] 84%\r[====================================================>       ] 87%\r[====================================================>       ] 87%\r[====================================================>       ] 88%\r[=====================================================>      ] 89%\r[=====================================================>      ] 89%\r[=====================================================>      ] 89%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\rError: Failed to load http://127.0.0.1:11066/getversionjpg?hash=418143, with network status code 1 and http status code 0 - Connection refused\r\n[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[============================================================] 100%\r[======>                                                     ] 10% \r[============================================================] 100%\r[======>                                                     ] 10% \r[======>                                                     ] 10%\rWarning: A finished ResourceObject received a loading finished signal. This might be an indication of an iframe taking too long to load.\r\nWarning: A finished ResourceObject received a loading progress signal. This might be an indication of an iframe taking too long to load.\r\nCounting pages (2/6)\r\n[============================================================] Object 1 of 1\rResolving links (4/6)                                                       \r\n[============================================================] Object 1 of 1\rLoading headers and footers (5/6)                                           \r\nPrinting pages (6/6)\r\n[>                                                           ] Preparing\r[===>                                                        ] Page 1 of 20\r[======>                                                     ] Page 2 of 20\r[=========>                                                  ] Page 3 of 20\r[============>                                               ] Page 4 of 20\r[===============>                                            ] Page 5 of 20\r[==================>                                         ] Page 6 of 20\r[=====================>                                      ] Page 7 of 20\r[========================>                                   ] Page 8 of 20\r[===========================>                                ] Page 9 of 20\r[==============================>                             ] Page 10 of 20\r[=================================>                          ] Page 11 of 20\r[====================================>                       ] Page 12 of 20\r[=======================================>                    ] Page 13 of 20\r[==========================================>                 ] Page 14 of 20\r[=============================================>              ] Page 15 of 20\r[================================================>           ] Page 16 of 20\r[===================================================>        ] Page 17 of 20\r[======================================================>     ] Page 18 of 20\r[=========================================================>  ] Page 19 of 20\r[============================================================] Page 20 of 20\rDone                                                                        \r\nExit with code 1 due to network error: ConnectionRefusedError\r\n",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mOSError\u001b[0m                                   Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-28-0ef5a75b705d>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      3\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mindex\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mlink\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mzip\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mnames\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mhrefs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      4\u001b[0m     \u001b[0mtime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m5\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m     \u001b[0mpdfkit\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfrom_url\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlink\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mindex\u001b[0m\u001b[1;33m+\u001b[0m\u001b[1;34m\".pdf\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      6\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      7\u001b[0m \u001b[1;31m# from wkhtmltopdf import HTMLURLToPDF\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mG:\\1codesoft\\anaconda3\\lib\\site-packages\\pdfkit\\api.py\u001b[0m in \u001b[0;36mfrom_url\u001b[1;34m(url, output_path, options, toc, cover, configuration, cover_first)\u001b[0m\n\u001b[0;32m     24\u001b[0m                configuration=configuration, cover_first=cover_first)\n\u001b[0;32m     25\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 26\u001b[1;33m     \u001b[1;32mreturn\u001b[0m \u001b[0mr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mto_pdf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0moutput_path\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     27\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     28\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mG:\\1codesoft\\anaconda3\\lib\\site-packages\\pdfkit\\pdfkit.py\u001b[0m in \u001b[0;36mto_pdf\u001b[1;34m(self, path)\u001b[0m\n\u001b[0;32m    154\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    155\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[1;34m'Error'\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mstderr\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 156\u001b[1;33m             \u001b[1;32mraise\u001b[0m \u001b[0mIOError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'wkhtmltopdf reported an error:\\n'\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mstderr\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    157\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    158\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mexit_code\u001b[0m \u001b[1;33m!=\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mOSError\u001b[0m: wkhtmltopdf reported an error:\nLoading pages (1/6)\r\n[>                                                           ] 0%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[======>                                                     ] 10%\r[=============>                                              ] 23%\r[=============>                                              ] 23%\rWarning: Failed to load http://7xjyw1.com1.z0.glb.clouddn.com/vue-lifecycle.png (ignore)\r\n[==============>                                             ] 24%\r[=====================>                                      ] 35%\r[======================>                                     ] 37%\r[========================>                                   ] 41%\r[=========================>                                  ] 43%\r[===========================>                                ] 46%\r[=============================>                              ] 49%\r[==============================>                             ] 51%\r[===============================>                            ] 53%\r[=====================================>                      ] 62%\r[========================================>                   ] 68%\r[==========================================>                 ] 71%\r[===========================================>                ] 73%\r[=============================================>              ] 76%\r[================================================>           ] 80%\r[=================================================>          ] 82%\r[==================================================>         ] 84%\r[====================================================>       ] 87%\r[====================================================>       ] 87%\r[====================================================>       ] 88%\r[=====================================================>      ] 89%\r[=====================================================>      ] 89%\r[=====================================================>      ] 89%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\rError: Failed to load http://127.0.0.1:11066/getversionjpg?hash=418143, with network status code 1 and http status code 0 - Connection refused\r\n[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[======================================================>     ] 90%\r[============================================================] 100%\r[======>                                                     ] 10% \r[============================================================] 100%\r[======>                                                     ] 10% \r[======>                                                     ] 10%\rWarning: A finished ResourceObject received a loading finished signal. This might be an indication of an iframe taking too long to load.\r\nWarning: A finished ResourceObject received a loading progress signal. This might be an indication of an iframe taking too long to load.\r\nCounting pages (2/6)\r\n[============================================================] Object 1 of 1\rResolving links (4/6)                                                       \r\n[============================================================] Object 1 of 1\rLoading headers and footers (5/6)                                           \r\nPrinting pages (6/6)\r\n[>                                                           ] Preparing\r[===>                                                        ] Page 1 of 20\r[======>                                                     ] Page 2 of 20\r[=========>                                                  ] Page 3 of 20\r[============>                                               ] Page 4 of 20\r[===============>                                            ] Page 5 of 20\r[==================>                                         ] Page 6 of 20\r[=====================>                                      ] Page 7 of 20\r[========================>                                   ] Page 8 of 20\r[===========================>                                ] Page 9 of 20\r[==============================>                             ] Page 10 of 20\r[=================================>                          ] Page 11 of 20\r[====================================>                       ] Page 12 of 20\r[=======================================>                    ] Page 13 of 20\r[==========================================>                 ] Page 14 of 20\r[=============================================>              ] Page 15 of 20\r[================================================>           ] Page 16 of 20\r[===================================================>        ] Page 17 of 20\r[======================================================>     ] Page 18 of 20\r[=========================================================>  ] Page 19 of 20\r[============================================================] Page 20 of 20\rDone                                                                        \r\nExit with code 1 due to network error: ConnectionRefusedError\r\n"
     ]
    }
   ],
   "source": [
    "import pdfkit\n",
    "import time\n",
    "for index,link in zip(names,hrefs):\n",
    "    time.sleep(5)\n",
    "    pdfkit.from_url(link,index+\".pdf\")\n",
    "    \n",
    "# from wkhtmltopdf import HTMLURLToPDF\n",
    "\n",
    "# make_pdf = HTMLURLToPDF(\n",
    "#     url=hrefs[0],\n",
    "#     output_file='~/example.pdf',\n",
    "# )\n",
    "# make_pdf.render()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
